package com.design.builder.chain;

/**
 * @auther LiZiBa
 * @date 2020/8/9 9:00
 * @description:链式创建者模式
 **/
public class CourseBuilder {

   private Course course = new Course();

   public Course builder(){
       return course;
   }

   public CourseBuilder setName(String name){
       course.setName(name);
       return this;
   }
   public CourseBuilder setPpt(String Ppt){
       course.setPpt(Ppt);
       return this;
   }
   public CourseBuilder setVideo(String video){
       course.setVideo(video);
       return this;
   }
   public CourseBuilder setHomework(String homework){
       course.setHomework(homework);
       return this;
   }

    @Override
    public String toString() {
        return "CourseBuilder{" +
                "course=" + course +
                '}';
    }
}
